﻿using Autofac;
using Zinnia.Kernel.Core;
using Zinnia.Kernel.Inject.Core;

namespace Zinnia.Cache
{
    /// <summary>
    /// 缓存依赖注册器
    /// </summary>
    public class CacheDependcyInjectRegister : IDependencyInjectRegister
    {
        public void Register(ContainerBuilder builder)
        {
            //缓存注入实现类可能变更，所以作为外部注入
            builder.RegisterInstance(new LocalCacheService()).As<ICacheService>().SingleInstance();
        }
    }
}
